import http from "@/api";

const url = "/main/appjob/query";
const jitSaveUrl = "/main/cpyiv/cpyivsave";
const jitListUrl = "/main/cpyiv/cpyivvolist";
const jitDeleteUrl = "/main/cpyiv/cpyivdelete";
const jitSendUrl = "/main/cpyiv/sendoiv";
const jobDetailUrl = "/main/appjob/detail";
const jitDetailUrl = "/main/cpyjob/jobinterviewinfo";

// export const getAppJobs = (params:IJobListParam = { page:1, pageSize:10, order: 0, companyId:'' }) => {
//     return http.post(url, params)
// }

export const getAppJobs = () => {
  return http.post(url, {});
};

export const getJobDetail = (id: string) => {
  return http.post(jobDetailUrl, { id });
};

export const getJitDetail = (id: string) => {
  return http.post(jitDetailUrl, { id });
};

export const saveJobInterviewTemplate = (form: any) => {
  return http.post(jitSaveUrl, { ...form });
};

export const getJobInterviewTemplates = () => {
  return http.post(jitListUrl, {});
};

export const deleteInterviewTemplate = (id: string) => {
  return http.post(jitDeleteUrl, { id });
};

export const sendInterview = form => {
  return http.post(jitSendUrl, { ...form });
};
